using System;
using System.Collections.Generic;
using System.Text;

namespace BUS
{
    public enum ChiTietPhieuTraBUSResult
    {
        OK, DAOERROR
    }
    public class ChiTietPhieuTraSach
    {
        public static ChiTietPhieuTraBUSResult Them(DTO.ChiTietPhieuTraSach chitiet)
        {
            DAO.ChiTietPhieuTraSach ct = new DAO.ChiTietPhieuTraSach();
            string sql = "INSERT INTO ChiTietPhieuTraSach(MaPhieuTra,MaSach,NgayMuon,SoNgayMuon,TienPhat) VALUES('";
            sql += chitiet.MaPhieuTra + "','";
            sql += chitiet.MaSach + "','";
            sql += chitiet.NgayMuon + "','";
            sql += chitiet.SoNgayMuon + "','";
            sql += chitiet.TienPhat + "')";
            if (ct.Insert(sql) == true)
                return ChiTietPhieuTraBUSResult.OK;
            else

                return ChiTietPhieuTraBUSResult.DAOERROR;

        }
    }
}
